﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace StuInfo
{
    public partial class AddInfo : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Model.StuInfo stuInfo = new Model.StuInfo()
            {
                Comment = TextBox1.Text,
                Name = text2.Value,
                Sex = RadioButton1.Checked ? "男" : "女"
            };
            if (StuInfoBLL.StuInfoListBLL.Add(stuInfo)>0)
            {
                Response.Write("<script>alert('添加成功！');location='StuInfoListUI.aspx';</script>");
            }

        }
    }
}